﻿<%@ Page Title="" Language="C#" MasterPageFile="Site1.Master" AutoEventWireup="true" CodeBehind="ProductCatalog.aspx.cs" Inherits="EWDTAssignment.ProductCatalog" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    #TextArea1
    {
        height: 110px;
        width: 750px;
    }
        .style1
        {
            width: 133px;
            text-align: center;
        }
        .style2
        {
            text-align: left;
        }
    </style>
   
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
  

  
  
	
   <h3>  <asp:Label ID="lblType" runat="server" Text="Label"  
         Font-Bold="True" ></asp:Label> </h3>
	
     &nbsp;&nbsp;&nbsp;
     <asp:ScriptManager ID="ScriptManager1" runat="server">
     </asp:ScriptManager>
     <br />

           
                <asp:ListView ID="lvProduct" runat="server" 
                GroupItemCount="6" onitemcommand="lvProduct_ItemCommand1" 
                onselectedindexchanged="lvProduct_SelectedIndexChanged" 
                    DataSourceID="dsRetProduct">
                    <AlternatingItemTemplate>
                    </AlternatingItemTemplate>
                    <GroupTemplate>
                        <tr ID="itemPlaceholderContainer" runat="server">
                            <td ID="itemPlaceholder" runat="server">
                            </td>
                        </tr>
                    </GroupTemplate>
                    <InsertItemTemplate>
                        <td runat="server" >
                            ProdName1:
                            <asp:TextBox ID="ProdName1TextBox" runat="server" 
                            Text='<%# Bind("ProdName1") %>' />
                            <br />
                            ProdID1:
                            <asp:TextBox ID="ProdID1TextBox" runat="server" Text='<%# Bind("ProdID1") %>' />
                            <br />
                            ProdDesc1:
                            <asp:TextBox ID="ProdDesc1TextBox" runat="server" 
                            Text='<%# Bind("ProdDesc1") %>' />
                            <br />
                            ProdCat1:
                            <asp:TextBox ID="ProdCat1TextBox" runat="server" 
                            Text='<%# Bind("ProdCat1") %>' />
                            <br />
                            Flag:
                            <asp:TextBox ID="FlagTextBox" runat="server" Text='<%# Bind("Flag") %>' />
                            <br />
                            Price:
                            <asp:TextBox ID="PriceTextBox" runat="server" Text='<%# Bind("Price") %>' />
                            <br />
                            Qty:
                            <asp:TextBox ID="QtyTextBox" runat="server" Text='<%# Bind("Qty") %>' />
                            <br />
                            ProdSpec:
                            <asp:TextBox ID="ProdSpecTextBox" runat="server" 
                            Text='<%# Bind("ProdSpec") %>' />
                            <br />
                            ImgDir:
                            <asp:TextBox ID="ImgDirTextBox" runat="server" Text='<%# Bind("ImgDir") %>' />
                            <br />
                            Imgg:
                            <asp:TextBox ID="ImggTextBox" runat="server" Text='<%# Bind("Imgg") %>' />
                            <br />
                            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" 
                            Text="Insert" />
                            <br />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" 
                            Text="Clear" />
                            <br />
                        </td>
                    </InsertItemTemplate>
                    <ItemTemplate>
                        <td runat="server" class="style1"  rowspan="1" >
                          
                                &nbsp;<asp:ImageButton ID="Image1" runat="server" Height="100px" 
                                ImageUrl='<%# Eval("ProdImg", "{0}") %>' 
                                PostBackUrl='<%# String.Format("~/ProductInfo.aspx?ProductID={0}", Eval("ProductID")) %>' 
                                Width="108px" />
                                <br />
                                  <p class="style2" align="center" style="width: 30%; height: 20%">
                                <asp:LinkButton ID="ProdName1Label" runat="server" 
                                OnClick="ProdName1Label_Click" 
                                PostBackUrl='<%# String.Format("~/ProductInfo.aspx?ProductID={0}", Eval("ProductID")) %>' 
                                Text='<%# Eval("ProductName") %>' Font-Overline="False" Font-Underline="False" 
                                    BorderColor="#CC6699"></asp:LinkButton>
                               </p>
                                <br />
                                <asp:Label ID="lblProdID" runat="server" Text='<%# Eval("ProductID") %>' 
                                Visible="False"></asp:Label>
                                <br />
                                &nbsp;<br />Price: $<asp:Label ID="PriceLabel" runat="server" 
                                Text='<%# Eval("Price") %>'></asp:Label>
                                <br />
                                <asp:ImageButton ID="imgBtnAddCart" runat="server" AlternateText="Add To Cart" 
                                ImageUrl="~/images/btn_add_cart.gif" OnClick="imgBtnAddCart_Click" 
                                Width="100px"  />
                                <br />
                                <br />
                         
                        </td>
                    </ItemTemplate>
                    <LayoutTemplate>
                        <table runat="server" cellpadding="4" cellspacing="4">
                            <tr runat="server">
                                <td runat="server" align="center">
                                    <table ID="groupPlaceholderContainer" runat="server" border="1" style="border-style: groove;" 
                                    cellpadding="10" cellspacing="10" width="100%" frame="border">
                                        <tr ID="groupPlaceholder" runat="server" valign="middle">
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr runat="server">
                                <td runat="server"  align="center">
                                    <asp:DataPager ID="DataPager1" runat="server">
                                        <Fields>
                                            <asp:TemplatePagerField>
                                            </asp:TemplatePagerField>
                                            <asp:NextPreviousPagerField FirstPageText="First" LastPageText="Last" 
                                            NextPageImageUrl="~/images/NextBtn.gif" NextPageText="Next" PreviousPageText="Previous" 
                                            ShowFirstPageButton="True" ShowNextPageButton="False" 
                                            ShowPreviousPageButton="False" />
                                            <asp:NumericPagerField />
                                            <asp:NextPreviousPagerField FirstPageText="First" LastPageText="" NextPageText="Next" 
                                            PreviousPageImageUrl="~/images/PrevBtn.gif" PreviousPageText="Previous" 
                                            ShowPreviousPageButton="False" />
                                        </Fields>
                                    </asp:DataPager>
                                </td>
                            </tr>
                        </table>
                    </LayoutTemplate>
                </asp:ListView>

	
     <br />
	
    

  
 
  
    
  
        
 

	
	

	      
    
	

 


	
	
  
    <br />
	
    

  
 
  
    
  
        
 

	
	

	      
    
	

 


	
	
  
    <br />
	
    

  
 
  
    
  
        
 

	
	

	      
    
	

 


	
	
  
   <asp:ObjectDataSource ID="dsRetProduct" runat="server" 
         OldValuesParameterFormatString="original_{0}" SelectMethod="getProduct" 
         TypeName="EWDTAssignment.App_Code.DBManager" 
         onselecting="dsRetProduct_Selecting">
     </asp:ObjectDataSource>
      
     <br />
      
    <asp:ObjectDataSource ID="dsProductByType" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="retrieveProduct" 
        TypeName="EWDTAssignment.App_Code.DBManager">
        <SelectParameters>
            <asp:QueryStringParameter Name="pCat" QueryStringField="category" 
                Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
       
  

</asp:Content>






              
                 
                 
             
			
		
      








